package org.jeecg.modules.demo3.fly.mapper;

import org.jeecg.modules.demo3.fly.entity.AxhkLandManagement;
import org.jeecg.modules.demo3.fly.entity.assist.AxhkLandManagements;
import org.jeecg.modules.demo3.fly.entity.AxhkWorkManagement;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.demo3.fly.entity.assist.qun.AxhkWorkManagements;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Description: 作业管理
 * @Author: jeecg-boot
 * @Date:   2021-01-28
 * @Version: V1.0
 */
public interface AxhkWorkManagementMapper extends BaseMapper<AxhkWorkManagement> {

    //通过手机APP添加任务
    int insetWork(AxhkWorkManagement axhkWorkManagement);

    //通过群id查询,该群下所有地块返还给APP
    ArrayList<AxhkLandManagements> getByWorkId(String fluckId);

    //根据群id获得,该群下所有的地块信息  返回给手机APP
    List<AxhkWorkManagement> getWorkAndLand(String fluckId);

    // 根据地块名称（landName）查询是否存在 此地块的 任务
    AxhkWorkManagement getByAxhkWorkManagement(String landName);

    //通过地块id查询到任务
    List<AxhkWorkManagement> getByAxhkWorks(String landId);

    //通过id 修改地块
    int getByUpdateWork(String id,String landId);

    /*
     * 修改 任务完成的 标识
     * String workId 任务id
     * String createBy 用户名 修改人
    * */
    int getUpdateFinish(String createBy,String workId,int finish);

    /*
    * 查看该用户下所有任务的完成信息
    * String createBy
    * int finish
    * */
    List<AxhkWorkManagement> getCreateByFinishWork(String createBy,int finish);

    /*
    * 查看该群下所有任务的完成信息
    * String fluckId
    * int finish
    * */
    List<AxhkWorkManagement> getFluckIdFinishFluck(String fluckId,int finish);
}
